Handle the case where the filechooser button is destroyed quickly.
authorMatthias Clasen <mclasen@redhat.com>
Thu, 17 Aug 2006 04:42:27 +0000 (04:42 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 17 Aug 2006 04:42:27 +0000 (04:42 +0000)
2006-08-17  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkfilechooserbutton.c (set_info_get_info_cb)
(model_add_special_get_info_cb): Handle the case where the
filechooser button is destroyed quickly.

ChangeLog
ChangeLog.pre-2-10
gtk/gtkfilechooserbutton.c

index 79a8fae4b008553e63d3be8b52a3d103159a3078..02ce3e26ac450a2a1b7aa1150346b933bc91278b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-08-17  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkfilechooserbutton.c (set_info_get_info_cb) 
+       (model_add_special_get_info_cb): Handle the case where the
+       filechooser button is destroyed quickly.
+
 2006-08-17  Paolo Borelli  <pborelli@katamail.com>
 
        * gtk/gtktextbuffer.c: make sure the has-selection property is
index 79a8fae4b008553e63d3be8b52a3d103159a3078..02ce3e26ac450a2a1b7aa1150346b933bc91278b 100644 (file)
@@ -1,3 +1,9 @@
+2006-08-17  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkfilechooserbutton.c (set_info_get_info_cb) 
+       (model_add_special_get_info_cb): Handle the case where the
+       filechooser button is destroyed quickly.
+
 2006-08-17  Paolo Borelli  <pborelli@katamail.com>
 
        * gtk/gtktextbuffer.c: make sure the has-selection property is
index ad57571f8b558213fcce738462e82c7d76b33c66..0aaea8ebc9bd31ada9542868992a53df51599e25 100644 (file)
@@ -1397,6 +1397,10 @@ set_info_get_info_cb (GtkFileSystemHandle *handle,
   GtkFileSystemHandle *model_handle;
   struct SetDisplayNameData *data = callback_data;
 
+  if (!data->button->priv->model)
+    /* button got destroyed */
+    goto out;
+
   path = gtk_tree_row_reference_get_path (data->row_ref);
   if (!path)
     /* Handle doesn't exist anymore in the model */
@@ -1565,6 +1569,10 @@ model_add_special_get_info_cb (GtkFileSystemHandle *handle,
   GtkFileSystemHandle *model_handle;
   struct ChangeIconThemeData *data = user_data;
 
+  if (!data->button->priv->model)
+    /* button got destroyed */
+    goto out;
+
   path = gtk_tree_row_reference_get_path (data->row_ref);
   if (!path)
     /* Handle doesn't exist anymore in the model */